package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysYmdCgBaseMapper;
import com.ruoyi.system.domain.SysYmdCgBase;
import com.ruoyi.system.service.ISysYmdCgBaseService;

/**
 * SysYmdCgBaseService业务层处理
 * 
 * @author SYF
 * @date 2025-05-09
 */
@Service
public class SysYmdCgBaseServiceImpl implements ISysYmdCgBaseService 
{
    @Autowired
    private SysYmdCgBaseMapper sysYmdCgBaseMapper;

    /**
     * 查询SysYmdCgBase
     * 
     * @param xdCycle SysYmdCgBase主键
     * @return SysYmdCgBase
     */
    @Override
    public SysYmdCgBase selectSysYmdCgBaseByXdCycle(String xdCycle)
    {
        return sysYmdCgBaseMapper.selectSysYmdCgBaseByXdCycle(xdCycle);
    }

    /**
     * 查询SysYmdCgBase列表
     * 
     * @param sysYmdCgBase SysYmdCgBase
     * @return SysYmdCgBase
     */
    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<SysYmdCgBase> selectSysYmdCgBaseList(SysYmdCgBase sysYmdCgBase)
    {
        return sysYmdCgBaseMapper.selectSysYmdCgBaseList(sysYmdCgBase);
    }

    /**
     * 新增SysYmdCgBase
     * 
     * @param sysYmdCgBase SysYmdCgBase
     * @return 结果
     */
    @Override
    public int insertSysYmdCgBase(SysYmdCgBase sysYmdCgBase)
    {
        return sysYmdCgBaseMapper.insertSysYmdCgBase(sysYmdCgBase);
    }

    /**
     * 修改SysYmdCgBase
     * 
     * @param sysYmdCgBase SysYmdCgBase
     * @return 结果
     */
    @Override
    public int updateSysYmdCgBase(SysYmdCgBase sysYmdCgBase)
    {
        return sysYmdCgBaseMapper.updateSysYmdCgBase(sysYmdCgBase);
    }

    /**
     * 批量删除SysYmdCgBase
     * 
     * @param xdCycles 需要删除的SysYmdCgBase主键
     * @return 结果
     */
    @Override
    public int deleteSysYmdCgBaseByXdCycles(String[] xdCycles)
    {
        return sysYmdCgBaseMapper.deleteSysYmdCgBaseByXdCycles(xdCycles);
    }

    /**
     * 删除SysYmdCgBase信息
     * 
     * @param xdCycle SysYmdCgBase主键
     * @return 结果
     */
    @Override
    public int deleteSysYmdCgBaseByXdCycle(String xdCycle)
    {
        return sysYmdCgBaseMapper.deleteSysYmdCgBaseByXdCycle(xdCycle);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<Map<String,Object>> selectDepts(String year){
        return sysYmdCgBaseMapper.selectDepts(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<Map<String,Object>> selectSales(String year){
        return sysYmdCgBaseMapper.selectSales(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<Map<String,Object>> selectDeptsByYear(String year){
        return sysYmdCgBaseMapper.selectDeptsByYear(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<Map<String,Object>> selectSalesByYear(String year){
        return sysYmdCgBaseMapper.selectSalesByYear(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<Map<String,Object>> selectTypes(String year){
        return sysYmdCgBaseMapper.selectTypes(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<SysYmdCgBase> selectYmdCgBaseLinkedList(SysYmdCgBase sysYmdCgBase){
        return sysYmdCgBaseMapper.selectYmdCgBaseLinkedList(sysYmdCgBase);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDM)
    public List<SysYmdCgBase> selectYmdCgBaseUnLinkedList(SysYmdCgBase sysYmdCgBase){
        return sysYmdCgBaseMapper.selectYmdCgBaseUnLinkedList(sysYmdCgBase);
    }
}
